package com.springsummer.information.green.beans;

import com.springsummer.information.green.hello.AutoEmpRepository;
import com.springsummer.information.green.hello.AutoEmpService;
import com.springsummer.information.green.hello.AutoPeachService;

import java.util.LinkedHashMap;
import java.util.Map;

public class InjectionMetadataTest {

    public static void main(String[] args) throws Exception {
        InjectionMetadata injectionMetadataService=new InjectionMetadata();
        InjectionMetadata injectionMetadata=injectionMetadataService.buildAutowiringMetadata(AutoEmpService.class);
        System.out.println(injectionMetadata.getElementMemberNames());
        Map<String,Object> memberMap=new LinkedHashMap<>();
        memberMap.put("autoEmpRepository",new AutoEmpRepository());
        memberMap.put("autoPeachService",new AutoPeachService());
        injectionMetadata.injectElements(new AutoEmpService(),"autoEmpService",memberMap);

    }
}
